import VueRouter from 'vue-router'
import About from './components/About.vue'
import Profile from './components/Profile.vue'
import Reset from './components/Reset.vue'
import Pets from './components/Pets.vue'
import Comment from './components/Comment.vue'
import Home from './components/Home.vue'
import AdoptForm from './components/AdoptForm.vue'
import Detail from './components/Detail.vue'


var router = new VueRouter({
    routes: [
        { path: '/', component: Home },
        {
            path: '/management/profile',
            component: Profile,
            meta: {
                title: '',
                requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的

            },
        },
        { 
            path: '/management/reset', 
            component: Reset,
            meta: {
                title: '',
                requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的

            },
        },
        { 
            path: '/management/pets', 
            component: Pets ,
            meta: {
                title: '',
                requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的

            },
        },
        { 
            path: '/management/comments', 
            component: Comment ,
            meta: {
                title: '',
                requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的

            },
        },
        { path: '/about', component: About },
        { 
            path: '/adoptform',
            component: AdoptForm,
            meta: {
                title: '',
                requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的

            },
        },
        { 
            path:'/detail/:id',
            component:Detail, 
            name:'detail' 
        },
    ]
})

export default router
